home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume91 / utilitys / wblink10 / part01
Encoding:
Internet Message Format  |  1991-09-19  |  28.3 KB

  1. Path: news.larc.nasa.gov!amiga-request
  2. From: amiga-request@ab20.larc.nasa.gov (Amiga Sources/Binaries Moderator)
  3. Subject: v91i171: WBLink 1.00 - create links to files from Workbench 2.0, Part01/01
  4. Reply-To: davids@btr.uucp (Dave Schreiber)
  5. Newsgroups: comp.sources.amiga
  6. Message-ID: <comp.sources.amiga.v91i171@ab20.larc.nasa.gov>
  7. Date: 19 Sep 91 10:10:04 GMT
  8. Approved: tadguy@uunet.UU.NET (Tad Guy)
  9. X-Mail-Submissions-To: amiga@uunet.uu.net
  10. X-Post-Discussions-To: comp.sys.amiga.misc
  11.  
  12. Submitted-by: davids@btr.uucp (Dave Schreiber)
  13. Posting-number: Volume 91, Issue 171
  14. Archive-name: utilities/wblink-1.00/part01
  15.  
  16. [ includes uuencoded executable and icons  ...tad ]
  17.  
  18. WBLink lets you create links to files from Workbench.  It puts an icon on
  19. the Workbench screen that creates a link to any file whose icon is dropped
  20. on it.    For Workbench 2.0 or later only.  Source included.
  21.  
  22. #!/bin/sh
  23. # This is a shell archive.  Remove anything before this line, then unpack
  24. # it by saving it into a file and typing "sh file".  To overwrite existing
  25. # files, type "sh file -c".  You can also feed this as standard input via
  26. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  27. # will see the following message at the end:
  28. #        "End of archive 1 (of 1)."
  29. # Contents:  Source Source/WBLink.c Source/WBLink.h WBLink.doc
  30. #   WBLink.doc.uu WBLink.info.uu WBLink.uu
  31. # Wrapped by tadguy@ab20 on Wed Sep 18 19:27:53 1991
  32. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  33. if test ! -d 'Source' ; then
  34.     echo shar: Creating directory \"'Source'\"
  35.     mkdir 'Source'
  36. fi
  37. if test -f 'Source/WBLink.c' -a "${1}" != "-c" ; then 
  38.   echo shar: Will not clobber existing file \"'Source/WBLink.c'\"
  39. else
  40. echo shar: Extracting \"'Source/WBLink.c'\" \(7936 characters\)
  41. sed "s/^X//" >'Source/WBLink.c' <<'END_OF_FILE'
  42. X
  43. X/*************************************************************************/
  44. X/*                 WBLink V1.00                 */
  45. X/*                                     */
  46. X/* WBLink is Copyright 1991 by Dave Schreiber.    All Rights Reserved     */
  47. X/*                                     */
  48. X/* WBLink puts an AppIcon on the Workbench.  When a file is dropped onto */
  49. X/* the icon, a link to that file is generated.                 */
  50. X/*************************************************************************/
  51. X
  52. X
  53. X#include <exec/types.h>
  54. X#include <exec/exec.h>
  55. X#include <intuition/intuition.h>
  56. X#include <workbench/startup.h>
  57. X#include <workbench/workbench.h>
  58. X#include <dos/dos.h>
  59. X
  60. X#include <proto/wb.h>
  61. X#include <proto/intuition.h>
  62. X#include <proto/exec.h>
  63. X#include <proto/dos.h>
  64. X#include <proto/icon.h>
  65. X
  66. X#include "WBLink.h"
  67. X
  68. X/* Function prototypes*/
  69. Xvoid _main();
  70. XBOOL GetLinkFilename(char *src,char *dest);
  71. Xvoid MakeName(char *src,char *dest,int c);
  72. Xvoid FindOrig(char *src,char *dest);
  73. Xvoid cleanup(UWORD err);
  74. X
  75. X/* Global variables */
  76. Xstruct Library *WorkbenchBase=NULL;
  77. Xstruct Library *IconBase=NULL;
  78. Xstruct Library *IntuitionBase=NULL;
  79. Xstruct Port *port=NULL;
  80. Xstruct AppIcon *appIcon=NULL;
  81. X
  82. X/*The version string*/
  83. Xchar *version="$VER: WBLink V1.00 (4.9.91)";
  84. X
  85. Xvoid _main()
  86. X{
  87. X   struct AppMessage *mesg;
  88. X   char dest[40],*src,temp[140];
  89. X   BPTR oldDir,fileLock;
  90. X   struct DiskObject *diskObj;
  91. X
  92. X   BOOL abort=FALSE;
  93. X   BOOL status;
  94. X   BOOL isDir=FALSE;
  95. X   UBYTE c;
  96. X
  97. X   /* Open libraries */
  98. X   WorkbenchBase=OpenLibrary("workbench.library",0L);
  99. X   if(WorkbenchBase==NULL)
  100. X      cleanup(50);
  101. X
  102. X   IconBase=OpenLibrary("icon.library",0L);
  103. X   if(IconBase==NULL)
  104. X      cleanup(75);
  105. X
  106. X   IntuitionBase=OpenLibrary("intuition.library",0L);
  107. X   if(IntuitionBase==NULL)
  108. X      cleanup(85);
  109. X
  110. X   /* Create a port for Workbench to use to communicate with us */
  111. X   port=CreatePort("",0);
  112. X   if(port==NULL)
  113. X      cleanup(100);
  114. X
  115. X   /* Create the application icon */
  116. X   appIcon = AddAppIcon(1,1,"WBLink",port,NULL,&iconObj,TAG_DONE,NULL);
  117. X
  118. X   if(appIcon==NULL)
  119. X      cleanup(300);
  120. X
  121. X   /* Loop until the user asks to quit */
  122. X   while(!abort)
  123. X   {
  124. X      /* Wait for a message from Workbench */
  125. X      WaitPort(port);
  126. X
  127. X      /* Get the message */
  128. X      mesg=(struct AppMessage *)GetMsg(port);
  129. X
  130. X      /* If am_NumArgs != 0, it means one or more icons were dropped on */
  131. X      /* the AppIcon */
  132. X      if(mesg->am_NumArgs!=0)
  133. X      {
  134. X     /* Loop for each file */
  135. X     for(c=0;c<mesg->am_NumArgs;c++)
  136. X     {
  137. X        /* Check to see if this is a drawer */
  138. X        if(mesg->am_ArgList[c].wa_Name[0]==0 &&
  139. X          mesg->am_ArgList[c].wa_Lock != NULL)
  140. X        {
  141. X           isDir=TRUE;
  142. X
  143. X           /* If it is a drawer, we didn't get the name from Workbench*/
  144. X           /* So we need to get the name from the lock instead*/
  145. X           if(!NameFromLock(mesg->am_ArgList[c].wa_Lock,temp,139))
  146. X          continue;
  147. X
  148. X           /* The name we get is the full path name.  This function*/
  149. X           /* call will leave us with just the directory*/
  150. X           src=FilePart(temp);
  151. X        }
  152. X        else
  153. X        {
  154. X           /* If it is a file, just copy the filename */
  155. X           strcpy(src,mesg->am_ArgList[c].wa_Name);
  156. X           isDir=FALSE;
  157. X        }
  158. X
  159. X        /* Move to the file's directory*/
  160. X        if(isDir)
  161. X           /* If we got a drawer, the lock is to the directory */
  162. X           /* itself.  To get the directory that the drawer is in, */
  163. X           /* we need to use ParentDir() */
  164. X           oldDir=CurrentDir(ParentDir(mesg->am_ArgList[c].wa_Lock));
  165. X        else
  166. X           oldDir=CurrentDir(mesg->am_ArgList[c].wa_Lock);
  167. X
  168. X        /* Get the destination filename (i.e. foo -> Link_to_foo ) */
  169. X        if(GetLinkFilename(src,dest))
  170. X        {
  171. X           /* Get a lock on the file that was given */
  172. X           if(isDir)
  173. X          fileLock=mesg->am_ArgList[c].wa_Lock;
  174. X           else
  175. X          fileLock=Lock(src,SHARED_LOCK);
  176. X
  177. X           /* If we got the lock, make the link */
  178. X           if(fileLock!=NULL)
  179. X           {
  180. X          status=MakeLink(dest,fileLock,FALSE);
  181. X          if(!isDir)
  182. X             UnLock(fileLock);
  183. X
  184. X          /* If we managed to make the link, copy (NOT link) the */
  185. X          /* source's icon */
  186. X          if(status)
  187. X          {
  188. X             /* Get the source file's icon */
  189. X             diskObj=GetDiskObject(src);
  190. X
  191. X             if(diskObj!=NULL)
  192. X             {
  193. X            /* Reset the icon's position*/
  194. X            diskObj->do_CurrentY=NO_ICON_POSITION;
  195. X            diskObj->do_CurrentX=NO_ICON_POSITION;
  196. X
  197. X            /* Store the icon as the destination's icon */
  198. X            PutDiskObject(dest,diskObj);
  199. X
  200. X            /* Free the disk object's memory */
  201. X            FreeDiskObject(diskObj);
  202. X             }
  203. X          }
  204. X          else
  205. X             EasyRequest(NULL,&erError2,NULL,
  206. X                 "Couldn't create the link",dest);
  207. X           }
  208. X           else
  209. X          EasyRequest(NULL,&erError3,NULL,"Couldn't open",
  210. X                  src,"for linking");
  211. X        }
  212. X        else
  213. X           EasyRequest(NULL,&erError2,NULL,"Couldn't create",
  214. X               "a filename for the link");
  215. X        /* Restore the old directory */
  216. X        CurrentDir(oldDir);
  217. X     }
  218. X      }
  219. X      else  /* If am_NumArgs==0, the user double clicked on the icon */
  220. X        /* So put up the About... requestor, and quit if the user */
  221. X        /* clicks on the "Quit WBLink" button  */
  222. X     abort=(EasyRequestArgs(NULL,&erAboutWBLink,NULL,NULL)==1);
  223. X
  224. X      /* Reply to the message */
  225. X      ReplyMsg((struct Message *)mesg);
  226. X   }
  227. X
  228. X   /* We're done, so exit */
  229. X   cleanup(0);
  230. X}
  231. X
  232. X
  233. X/* Create a link filename (i.e. foo -> Link_to_foo ) */
  234. XBOOL GetLinkFilename(char *src,char *dest)
  235. X{
  236. X   UWORD c;
  237. X   BPTR lock=1;
  238. X   char realSrc[40];
  239. X
  240. X   /* Strip away the link portion of the filename, leaving the original */
  241. X   /* filename */
  242. X   FindOrig(src,realSrc);
  243. X
  244. X   /* Loop until we get a unused filename slot */
  245. X   for(c=1;c<1000 && lock!=NULL;c++)
  246. X   {
  247. X      /* Create a filename (e.g. Link_22_to_HelloWorld) */
  248. X      MakeName(realSrc,dest,c);
  249. X
  250. X      /* See if it exists */
  251. X      lock=Lock(dest,SHARED_LOCK);
  252. X
  253. X      /* If the lock was successful, unlock the file */
  254. X      if(lock!=NULL)
  255. X     UnLock(lock);
  256. X   }
  257. X
  258. X   /* Return TRUE if the destination file name is <26 characters ( so */
  259. X   /* that the filename + .info won't exceed the Amiga's 30 character */
  260. X   /* filename limit) and if c<1000 (1000 is the upper limit on the   */
  261. X   /* number of files that will be created; it's in place as a safe-  */
  262. X   /* guard, to keep the above loop from becoming infinite)          */
  263. X   return((strlen(dest)<=25) && !(c==1000));
  264. X}
  265. X
  266. X/* Add the link prefix to the given filename */
  267. Xvoid MakeName(char *src,char *dest,int c)
  268. X{
  269. X   /* For c==1, don't use a number (e.g. foo -> Link_to_foo) */
  270. X   if(c==1)
  271. X   {
  272. X      strcpy(dest,"Link_to_");
  273. X      strcat(dest,src);
  274. X   }
  275. X   /* For all others, include the given number (e.g. for c==2, foo -> */
  276. X   /* Link_2_to_foo */
  277. X   else
  278. X   {
  279. X      strcpy(dest,"Link_");
  280. X      stci_d(&dest[5],c);
  281. X      strcat(dest,"_to_");
  282. X      strcat(dest,src);
  283. X   }
  284. X}
  285. X
  286. X
  287. X/* Strip the link information from the filename (i.e. convert */
  288. X/* Link_22_to_foobar into foobar) to make the 'original' filename */
  289. Xvoid FindOrig(char *src,char *dest)
  290. X{
  291. X   UBYTE c,numUS;
  292. X
  293. X   if((strnicmp(src,"link_",5))==0)
  294. X      if((strnicmp(src,"link_to_",8))==0)
  295. X     /* This handles Link_to_<filename> */
  296. X     strcpy(dest,&src[8]);
  297. X      else
  298. X      {
  299. X     /* This handles Link_<number>_to_<filename> */
  300. X     /* Move past two underscores (there are two after the <number>) */
  301. X     for(c=5,numUS=0;c<30;c++)
  302. X     {
  303. X        if(src[c]=='_')
  304. X           numUS++;
  305. X        if(numUS==2)
  306. X        {
  307. X           /* Whatever is left is the original filename */
  308. X           strcpy(dest,&src[c+1]);
  309. X           return;
  310. X        }
  311. X     }
  312. X     /*If we couldn't find two underscores, just copy the whole thing*/
  313. X     strcpy(dest,src);
  314. X      }
  315. X   else  /*This is just a regular filename, so copy the whole thing */
  316. X      strcpy(dest,src);
  317. X}
  318. X
  319. X/* This frees allocated resources */
  320. Xvoid cleanup(UWORD err)
  321. X{
  322. X   /* The AppIcon */
  323. X   if(appIcon!=NULL)
  324. X      RemoveAppIcon(appIcon);
  325. X
  326. X   /* The port */
  327. X   if(port!=NULL)
  328. X      DeletePort(port);
  329. X
  330. X
  331. X   /* The libraries */
  332. X   if(WorkbenchBase!=NULL)
  333. X      CloseLibrary(WorkbenchBase);
  334. X
  335. X   if(IconBase!=NULL)
  336. X      CloseLibrary(IconBase);
  337. X
  338. X   if(IntuitionBase!=NULL)
  339. X      CloseLibrary(IntuitionBase);
  340. X
  341. X   /* Exit the program, using the specified error code */
  342. X   exit(err);
  343. X}
  344. X
  345. X
  346. END_OF_FILE
  347. if test 7936 -ne `wc -c <'Source/WBLink.c'`; then
  348.     echo shar: \"'Source/WBLink.c'\" unpacked with wrong size!
  349. fi
  350. # end of 'Source/WBLink.c'
  351. fi
  352. if test -f 'Source/WBLink.h' -a "${1}" != "-c" ; then 
  353.   echo shar: Will not clobber existing file \"'Source/WBLink.h'\"
  354. else
  355. echo shar: Extracting \"'Source/WBLink.h'\" \(3414 characters\)
  356. sed "s/^X//" >'Source/WBLink.h' <<'END_OF_FILE'
  357. X
  358. XUSHORT ImageData1[] = {
  359. X    0x1FFF,0xFFE0,0x0000,0x6000,0x0018,0x0000,0x4000,0x0008,
  360. X    0x0000,0xC7FF,0xFF8C,0x0000,0x8C00,0xFEC4,0x0000,0x8803,
  361. X    0x83C4,0x0000,0x8802,0x00C4,0x0000,0x8804,0x0044,0x0000,
  362. X    0x8C04,0x7CC4,0x0000,0xC7FC,0xFF8C,0x0000,0x4004,0x8008,
  363. X    0x0000,0x6004,0x8018,0x0000,0x1FFC,0xFFE0,0x0000,0x0004,
  364. X    0x8FFF,0xFFE0,0x0004,0xB000,0x0018,0x0000,0x2000,0x0008,
  365. X    0x0000,0x63FF,0xFF8C,0x0000,0x4640,0x00C4,0x0004,0xC640,
  366. X    0x0044,0x0004,0xC640,0x0044,0x0004,0xC640,0x0044,0x0004,
  367. X    0xC640,0x00C4,0x0004,0xE67F,0xFF8C,0x0004,0x7C40,0x0008,
  368. X    0x0004,0x0040,0x0018,0x0002,0x00FF,0xFFE0,0x0003,0x8380,
  369. X    0x0000,0x0000,0xFE00,0x0000,0x0000,0x0000,0x0000,0x1FFF,
  370. X    0xFFE0,0x0000,0x3FFF,0xFFF0,0x0000,0x3800,0x0070,0x0000,
  371. X    0x7000,0x0038,0x0000,0x7000,0x7C38,0x0000,0x7001,0xFF38,
  372. X    0x0000,0x7003,0xFFB8,0x0000,0x7003,0x8338,0x0000,0x3803,
  373. X    0x0070,0x0000,0x3FFB,0x7FF0,0x0000,0x1FFB,0x7FE0,0x0000,
  374. X    0x0003,0x0000,0x0000,0x0003,0x0000,0x0000,0x0003,0x0FFF,
  375. X    0xFFE0,0x0000,0x1FFF,0xFFF0,0x0000,0x1C00,0x0070,0x0000,
  376. X    0x3980,0x0038,0x0003,0x3980,0x0038,0x0003,0x3980,0x0038,
  377. X    0x0003,0x3980,0x0038,0x0003,0x3980,0x0038,0x0003,0x1980,
  378. X    0x0070,0x0003,0x83BF,0xFFF0,0x0003,0xFFBF,0xFFE0,0x0001,
  379. X    0xFF00,0x0000,0x0000,0x7C00,0x0000,0x0000,0x0000,0x0000
  380. X};
  381. X
  382. Xstruct Image Image1 = {
  383. X    0,0,
  384. X    46,28,
  385. X    2,
  386. X    ImageData1,
  387. X    0x0003,0x0000,
  388. X    NULL
  389. X};
  390. X
  391. XUSHORT ImageData2[] = {
  392. X    0x1FFF,0xFFE0,0x0000,0x6000,0x0018,0x0000,0x4000,0x0008,
  393. X    0x0000,0xC7FF,0xFF8C,0x0000,0x8C00,0xFEC4,0x0000,0x8803,
  394. X    0x83C4,0x0000,0x8802,0x00C4,0x0000,0x8804,0x0044,0x0000,
  395. X    0x8C04,0x7CC4,0x0000,0xC7FC,0xFF8C,0x0000,0x4004,0x8008,
  396. X    0x0000,0x6004,0x8018,0x0000,0x1FFC,0xFFE0,0x0000,0x0004,
  397. X    0x8FFF,0xFFE0,0x0004,0xB000,0x0018,0x0004,0xA000,0x0008,
  398. X    0x0004,0xE3FF,0xFF8C,0x0004,0xC640,0x00C4,0x0004,0xC640,
  399. X    0x0044,0x0004,0xC640,0x0044,0x0004,0xC640,0x0044,0x0004,
  400. X    0xC640,0x00C4,0x0004,0xE67F,0xFF8C,0x0004,0x7C40,0x0008,
  401. X    0x0004,0x0040,0x0018,0x0002,0x00FF,0xFFE0,0x0003,0x8380,
  402. X    0x0000,0x0000,0xFE00,0x0000,0x0000,0x0000,0x0000,0x1FFF,
  403. X    0xFFE0,0x0000,0x3FFF,0xFFF0,0x0000,0x3800,0x0070,0x0000,
  404. X    0x7000,0x0038,0x0000,0x7000,0x7C38,0x0000,0x7001,0xFF38,
  405. X    0x0000,0x7003,0xFFB8,0x0000,0x7003,0x8338,0x0000,0x3803,
  406. X    0x0070,0x0000,0x3FFB,0x7FF0,0x0000,0x1FFB,0x7FE0,0x0000,
  407. X    0x0003,0x0000,0x0000,0x0003,0x0000,0x0000,0x0003,0x0FFF,
  408. X    0xFFE0,0x0003,0x1FFF,0xFFF0,0x0003,0x1C00,0x0070,0x0003,
  409. X    0x3980,0x0038,0x0003,0x3980,0x0038,0x0003,0x3980,0x0038,
  410. X    0x0003,0x3980,0x0038,0x0003,0x3980,0x0038,0x0003,0x1980,
  411. X    0x0070,0x0003,0x83BF,0xFFF0,0x0003,0xFFBF,0xFFE0,0x0001,
  412. X    0xFF00,0x0000,0x0000,0x7C00,0x0000,0x0000,0x0000,0x0000
  413. X};
  414. X
  415. Xstruct Image Image2 = {
  416. X    0,0,
  417. X    46,28,
  418. X    2,
  419. X    ImageData2,
  420. X    0x0003,0x0000,
  421. X    NULL
  422. X};
  423. X
  424. Xstruct DiskObject iconObj=
  425. X{
  426. X   WB_DISKMAGIC,
  427. X   WB_DISKVERSION,
  428. X   {
  429. X    NULL,
  430. X    87,30,
  431. X    46,28,
  432. X    GADGHIMAGE+GADGIMAGE,
  433. X    RELVERIFY,
  434. X    BOOLGADGET,
  435. X    (APTR)&Image1,
  436. X    (APTR)&Image2,
  437. X    NULL,
  438. X    NULL,
  439. X    NULL,
  440. X    NULL,
  441. X    NULL
  442. X
  443. X   },
  444. X   WBAPPICON,
  445. X   NULL,
  446. X   NULL,
  447. X   NO_ICON_POSITION,
  448. X   NO_ICON_POSITION,
  449. X   NULL,
  450. X   NULL,
  451. X   NULL
  452. X};
  453. X
  454. Xstruct EasyStruct erAboutWBLink=
  455. X{
  456. X   sizeof(struct EasyStruct),
  457. X   0,
  458. X   "About...",
  459. X   "WBLink V1.00\nReleased September 4, 1991\n\2511991 by Dave Schreiber",
  460. X   "Quit WBLink|Don't Quit"
  461. X};
  462. X
  463. Xstruct EasyStruct erError2=
  464. X{
  465. X   sizeof(struct EasyStruct),
  466. X   0,
  467. X   "Program Request...",
  468. X   "Error: %s\n%s",
  469. X   "Ok"
  470. X};
  471. X
  472. Xstruct EasyStruct erError3=
  473. X{
  474. X   sizeof(struct EasyStruct),
  475. X   0,
  476. X   "Program Request...",
  477. X   "Error: %s\n%s\n%s",
  478. X   "Ok"
  479. X};
  480. X
  481. END_OF_FILE
  482. if test 3414 -ne `wc -c <'Source/WBLink.h'`; then
  483.     echo shar: \"'Source/WBLink.h'\" unpacked with wrong size!
  484. fi
  485. # end of 'Source/WBLink.h'
  486. fi
  487. if test -f 'WBLink.doc' -a "${1}" != "-c" ; then 
  488.   echo shar: Will not clobber existing file \"'WBLink.doc'\"
  489. else
  490. echo shar: Extracting \"'WBLink.doc'\" \(3434 characters\)
  491. sed "s/^X//" >'WBLink.doc' <<'END_OF_FILE'
  492. X
  493. X                   WBLink V1.00
  494. X                 by Dave Schreiber
  495. X
  496. X     WBLink is copyright 1991 by Dave Schreiber, All Rights Reserved.
  497. XWBLink is freely distributable, but the author retains all rights in
  498. Xregards to the program.  Permission is granted to distribute this program
  499. Xfor a minimal charge (for copying, handling, etc.).
  500. X
  501. X     WBLink is a small utility I wrote in order to deal with what I think
  502. Xis a deficiency in Workbench 2.0:  namely, there's no way to create a link
  503. Xfrom one file to another using Workbench (a link is like a second (or
  504. Xthird, etc.) name for a file;  although both the original program and the
  505. Xlink have their own icon, there's only one copy of the program actually on
  506. Xdisk.  See the description of 'Makelink' in the AmigaDOS reference section
  507. Xof the manual that came with 2.0 or your Amiga for more information).
  508. XWBLink creates an 'AppIcon' that allows you to create links easily.
  509. X
  510. X     To run WBLink, either double-click on it's icon or type 'Run
  511. XWBLink' from the CLI.  If you'd like it to be run automatically when you
  512. Xboot up, you can put it in your 'Wbstartup' drawer.  When run, WBLink puts
  513. Xup an icon on the Workbench;  if you drop the icon for a file or drawer
  514. Xonto WBLink's icon, a link to that file or drawer is created.  The naming
  515. Xconvention is similar for the Copy menu selection: the first link, for a
  516. Xprogram named 'prog' for example, will be named Link_to_prog.  The second,
  517. XLink_2_to_prog, etc.  Once the link is created, it can be renamed and moved
  518. Xanywhere on the drive (although if you move it to another disk, regular
  519. Xcopy of the file is made and put on the destination disk, instead of a
  520. Xlink;  this is due to a limitation in the way the Amiga's OS handles
  521. Xlinks).
  522. X
  523. X     Note:  while WBLink creates links to files and drawers, it copies
  524. X.info files.  This means that you can position a file and its link
  525. Xindependently (whereas if WBLink created a link to both the file and .info
  526. Xfile, every time you moved the original file's icon, the link's icon would
  527. Xmove to the same location).
  528. X
  529. X     If you double click on WBLink's icon, a requester pops up that gives
  530. Xyou the version and release date of WBLink, along with an opportunity to
  531. Xquit WBLink.  To quit, click on the 'Quit WBLink' button.  The 'Don't Quit'
  532. Xbutton closes the requestor, but leaves WBLink running.
  533. X
  534. X     To give you an idea of the usefulness of links, let me describe one
  535. Xuse I have for them.  I have a number of programs that I run often that I
  536. Xwould like to have directly on Workbench for easy access.  Unfortunatly
  537. XWorkbench tends to slow down if you leave out a lot of icons.  My solution
  538. Xwas to create a drawer called 'Dock' (after the NeXT's feature of the same
  539. Xname) and leave that out instead.  In that drawer, I placed links to my
  540. Xfrequently used programs.  With this arrangement, I have easy access to my
  541. Xprograms without cluttering up or slowing down Workbench.  Moreover, this
  542. Xtakes up only a few kilobytes on my hard drive (whereas making copies of
  543. Xthe programs to put in Dock would have taken up over a megabyte).
  544. X
  545. X     If you're interested in how WBLink operates, I've included the source.
  546. XTo compile, using SAS/C V5.10a, type the following in the command line:
  547. X
  548. X   lc -Lcd -v WBLink
  549. X
  550. X     If you have any questions, comments, etc. regarding WBLink, please
  551. Xdon't hesitate to get in touch with me at:
  552. X
  553. X                      Dave Schreiber
  554. X                      1234 Collins Lane
  555. X                      San Jose, CA     95129-4208
  556. Xe-mail:                   davids@ucscb.ucsc.edu
  557. X
  558. END_OF_FILE
  559. if test 3434 -ne `wc -c <'WBLink.doc'`; then
  560.     echo shar: \"'WBLink.doc'\" unpacked with wrong size!
  561. fi
  562. # end of 'WBLink.doc'
  563. fi
  564. if test -f 'WBLink.doc.uu' -a "${1}" != "-c" ; then 
  565.   echo shar: Will not clobber existing file \"'WBLink.doc.uu'\"
  566. else
  567. echo shar: Extracting \"'WBLink.doc.uu'\" \(408 characters\)
  568. sed "s/^X//" >'WBLink.doc.uu' <<'END_OF_FILE'
  569. Xbegin 666 WBLink.doc.info
  570. XMXQ```0``````/@!2`!0`$@`%``,``0?"1N@`````````````````````````J
  571. XM```!!#('PD>@!\#O,````#H```!``````````````!`````````4`!$``@`)'
  572. XM7,@#``````#__P``@`&``('Q0`"``?``G]P0`(``$`";SQ``@``0`)[_D`"`;
  573. XM`!``G[P0`(``$`">UA``@``0`)_/D`"``!``___P``````!__@``?@Z``'_^A
  574. XM``!@(^``?__@`&0PX`!__^``80!@`'__X`!@0^``?__@`&$IX`!__^``8#!@+
  575. XD`'__X```````````$W-Y<SI5=&EL:71I97,O36]R90`````$,
  576. X``
  577. Xend
  578. Xsize 261
  579. END_OF_FILE
  580. if test 408 -ne `wc -c <'WBLink.doc.uu'`; then
  581.     echo shar: \"'WBLink.doc.uu'\" unpacked with wrong size!
  582. fi
  583. # end of 'WBLink.doc.uu'
  584. fi
  585. if test -f 'WBLink.info.uu' -a "${1}" != "-c" ; then 
  586.   echo shar: Will not clobber existing file \"'WBLink.info.uu'\"
  587. else
  588. echo shar: Extracting \"'WBLink.info.uu'\" \(1877 characters\)
  589. sed "s/^X//" >'WBLink.info.uu' <<'END_OF_FILE'
  590. Xbegin 666 WBLink.info
  591. XMXQ```0``````*``:`#\`)``&``,``0?$CX`'Q)#8````````````````````P
  592. XM```!`S('QX_`!\#O6````"0````(`````````````!]````````_`"0``@`):
  593. XM79@#`````````````````@`````````&``````````8`````````!@`/___P)
  594. XM```&`#````P```8`(```!```!@!C___&```&`$8`?V(```8`1`'!X@``!@!$^
  595. XM`0!B```&`$0"`"(```8`1@(^8@``!@!C_G_&```&`"`"0`0```8`,`)`#```;
  596. XM!@`/_G_P```&```"1___\`8```)8```,!@```!````0&````,?__Q@8````CI
  597. XM(`!B!@```F,@`"(&```"8R``(@8```)C(``B!@```F,@`&(&```"<S__Q@8`[
  598. XM``(^(``$!@```@`@``P&```!`'__\`8```'!P```!@```'\````&````````@
  599. XM``8`````````!@`````````&?_________[__________-5555555550U555@
  600. XM555555#5555555554-50```%5550U4____%555#57___^5554-4<```Y5550!
  601. XMU3@``!U555#5.``^'5554-4X`/^=5550U3@!_]U555#5.`'!G5554-4<`8`Y>
  602. XM5550U5_]O_E555#53_V_\5554-50`8`!5550U555@```!5#5556'___Q4-55,
  603. XM5`____E0U554#@``.5#5550<P``=4-5559S``!U0U555G,``'5#5556<P``=.
  604. XM4-5559S``!U0U555C,``.5#5557!W__Y4-555?_?__%0U554_X``!5#5550^^
  605. XM%5554-5550!55550U555555555#5555555554-5555555550@```````````&
  606. XM`````#\`)``"``E?V`,````````````````"``````````8`````````!@``V
  607. XM```````&``____````8`,```#```!@`@```$```&`&/__\8```8`1@!_8@``)
  608. XM!@!$`<'B```&`$0!`&(```8`1`(`(@``!@!&`CYB```&`&/^?\8```8`(`)`+
  609. XM!```!@`P`D`,```&``_^?_````8```)'___P!@```E@```P&```"4```!`8`5
  610. XM``)Q___&!@```F,@`&(&```"8R``(@8```)C(``B!@```F,@`"(&```"8R``V
  611. XM8@8```)S/__&!@```CX@``0&```"`"``#`8```$`?__P!@```<'````&````"
  612. XM?P````8`````````!@`````````&``````````9__________O_________\#
  613. XMU555555555#5555555554-5555555550U5````5555#53___\5554-5?___Y%
  614. XM5550U1P``#E555#5.```'5554-4X`#X=5550U3@`_YU555#5.`'_W5554-4XX
  615. XM`<&=5550U1P!@#E555#57_V_^5554-5/_;_Q5550U5`!@`%555#5556````%1
  616. XM4-5558?___%0U555C___^5#5556.```Y4-5559S``!U0U555G,``'5#5556<K
  617. XMP``=4-5559S``!U0U555G,``'5#5556,P``Y4-555<'?__E0U555_]__\5#5J
  618. XM553_@``%4-555#X55550U555`%5555#5555555554-5555555550U5555555:
  619. XM55"``````````````!%%>%`Z17AP<F5S<U!A:6YT``````@````*1$].3U170
  620. X$04E4````>
  621. X``
  622. Xend
  623. Xsize 1309
  624. END_OF_FILE
  625. if test 1877 -ne `wc -c <'WBLink.info.uu'`; then
  626.     echo shar: \"'WBLink.info.uu'\" unpacked with wrong size!
  627. fi
  628. # end of 'WBLink.info.uu'
  629. fi
  630. if test -f 'WBLink.uu' -a "${1}" != "-c" ; then 
  631.   echo shar: Will not clobber existing file \"'WBLink.uu'\"
  632. else
  633. echo shar: Extracting \"'WBLink.uu'\" \(6853 characters\)
  634. sed "s/^X//" >'WBLink.uu' <<'END_OF_FILE'
  635. Xbegin 666 WBLink
  636. XM```#\P`````````"``````````$```,T```!P@```^D```,T2.=^_B1()`!):
  637. XM^0`````L>``$1_D```5@<@`@/````&I@`B;!4<C__"E/!:`I3@680JP%G'``+
  638. XM(CP``#``3J[^SD/Z`:AP`$ZN_=@I0`<$9@9P9&```2PF;@$4*6L`F`642JL`A
  639. XMK&<``)(@#Y"O`#@&@````(`I0`5D(&L`K-'(T<@B:``0T\G3R2`"<@`2&2E)/
  640. XM!:C0@5Z``D#__"E`!;!(YT!`(CP``0`!3J[_.DS?`@)*@&8,(#P```/H+P!G#
  641. XM``$<($`I0`6L(`)3@-2!$;(``"`"4X)1R/_V$;P`("`"4X(1O``B(`(1L2```
  642. XM(`%1RO_X$+P`(B\(8'@I:P`Z!61P?U*`T:P%9$'K`%Q.KOZ`0>L`7$ZN_HPI'
  643. XM0`6<+P`D0"`J`"1G&"QL!P0@0"(H``!.KO^@*4`%E"(`3J[_@B(J`"!G&B0\W
  644. XM```#[4ZN_^(I0`6D9PKEB"!`)V@`"`"D(&P%G"\(2&P%8"!H`"0I:``$!:A.1
  645. XMN@5N3KH`@G``8`0@+P`$+FP%H"\`("P%C&<$($!.D$ZZ!Q).N@5,2JP%G&<JT
  646. XM+&P'!"(L!:1G!$ZN_]PB+`649P1.KO^F+'@`!$ZN_WPB;`6<3J[^AF`2("P%@
  647. XML&<,(FP%K"QX``1.KO\N(FP'!$ZN_F(@'TS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  679. XM,`@`2@5G&@@%``1F%"`&2,#G@$'L!;0O,`@$3KH##%A/4T9@S"\'3KKYZ%A/"
  680. XM3-\`X$YU```````````````````@+P`$#```86T*#```>FX$!```($YU``!.R
  681. XM5?_\2.<#,"9O`!PD;P`@+B\`)$J'9S9*$V<R2A)G+G``$!LO`$ZZ_\!R`!(:;
  682. XM+H$O0``43KK_LEA/(B\`$)*`+`%*AF<$(`9@&E.'8,9*AV<02A-G!'`!8`I*"
  683. XM$F<$</]@`G``3-\,P$Y=3G4@;P`$(`A*&&;\4TB1P"`(3G4``")O``@@;P`$E
  684. XM(`@0V6;\3G4B;P`((&\`!"`(2AAF_%.($-EF_$YU```@+P`((&\`!$Y5__0B9
  685. XM3VP&$/P`+42`<@I.N@)D!D$`,!+!2H!F\!#AO\EF^D(0(`A.79"O``1.=4CG%
  686. XM`#(F;`;T(`MG%"13(DL@*0`(+'@`!$ZN_RXF2F#HD<@I2`;X*4@&]$S?3`!.:
  687. XM=4CG#Q`N+P`8+"\`'"HO`"`O!TZZ`R183R9`(`MF!'#_8!XO!2\&+RL`!$ZZK
  688. XM`.!/[P`,*`!*K`5X9P1P_V`"(`1,WPCP3G4``````````'!A2.<#$"XO`!!'2
  689. XM[`3X(`MG-`@K``(`&V8H""L``0`;9R`@*P`$D*L`$"P`2H9G$B\&+RL`$"\KJ
  690. XM`!Q.NOV&3^\`#"938,@O!TZZ_>!83TS?",!.=0``````````<&%(YS<2+B\`P
  691. XM("9O`"0L+P`H2JP%D&<$3KH"M$*L!7@B!R0+)@8L;`<$3J[_T"H`</^Z@&8.T
  692. XM3J[_?"E`!7AP!2E`!P`@!4S?2.Q.=0``````````````````````````<&%(B
  693. XMYS\"+B\`("PO`"0J+P`H2JP%D&<$3KH"5$*L!7@@!5.`(@<D!B8`+&P'!$ZNT
  694. XM_[XH`'#_N(!F#DZN_WPI0`5X<!8I0`<`(`5*@&<*4X!G"E.`9PQ@&"`&8!0@O
  695. XM!-"&8`XB!W0`)@(L;`<$3J[_ODS?0/Q.=4CG`!(F;P`,2JL`"F<*(DLL>``$Z
  696. XM3J[^F!=\`/\`"'#_)T``%'``$"L`#RQX``1.KOZP(DMP(DZN_RY,WT@`3G5((
  697. XMYP$"+B\`#$JL!9!G!$ZZ`:@B!RQL!P1.KO_<<`!,WT"`3G5*@&H``!Y$@$J!<
  698. XM:@``#$2!80``($2!3G5A```81(!$@4YU2H%J```,1(%A```&1(!.=2\"2$$TK
  699. XM`68``")(0$A!2$(T`&<```:$P3`"2$`T`(3!,`)(0C(")!].=2\#=A`,00"`X
  700. XM9```!N&944,,00@`9```!NF964,,02``9```!N6954-*06L```;CF5-#-`#FJ
  701. XMJ$A"0D+FJDA#@,$V`#`"-`-(0<3!D()D```(4T/0@63^<@`R`TA#Y[A(0,%!A
  702. XM)A\D'TYU2.<#,B9O`!@N+P`<</\L>``$3J[^MGP`'`!P_[R`9@1P`&!F<"(BS
  703. XM/``!``%.KO\Z)$`@"F8((`9.KOZP8$HE2P`*(`<50``)%7P`!``(0BH`#B`&E
  704. XM%4``#Y/)3J[^VB5``!`@"V<((DI.KOZ>8!I!Z@`8)4@`%$'J`!0E2``<0JH`9
  705. XM&!5\``(`("`*3-],P$YU+P<N+P`(<``I0`5X2H=K(KZL!/1L'"`'YX!![`6T<
  706. XM2K`(`&<.(`?G@$'L!;31P"`(8`AP"2E`!P!P`"X?3G4``$CG`0)P`"(\```PE
  707. XM`"QX``1.KO[.+@`"AP``,`!*AV<@2JP%D&<:(&P%D$Z02H!F`F`.0JP%D$AX=
  708. XM`!1.NOK$6$],WT"`3G5AN$YU``!(YP`R+'D```0*1^\`$$S;!P!.KOVT3-],W
  709. XM`$YU2.<`.BQY```$`DGO`!1,W`\#3J[_Q$S?7`!.=0```^P````$`````0``:
  710. XM#+H```R>````%`````H````````#\`````-?061D07!P26-O;@````RT````6
  711. XM`U]%87-Y4F5Q=65S=```#)@````````#\@```^H```%8'___X```8```&```Q
  712. XM0```"```Q___C```C`#^Q```B`.#Q```B`(`Q```B`0`1```C`1\Q```Q_S_I
  713. XMC```0`2`"```8`2`&```'_S_X`````2/___@``2P```8```@```(``!C__^,@
  714. XM``!&0`#$``3&0`!$``3&0`!$``3&0`!$``3&0`#$``3F?_^,``1\0``(``0`"
  715. XM0``8``(`___@``.#@`````#^````````````'___X```/___\```.```<```.
  716. XM<```.```<`!\.```<`'_.```<`/_N```<`.#.```.`,`<```/_M_\```'_M_Y
  717. XMX`````,```````,```````,/___@```?___P```<``!P```Y@``X``,Y@``X4
  718. XM``,Y@``X``,Y@``X``,Y@``X``,9@`!P``.#O__P``/_O__@``'_``````!\X
  719. XM```````````````````N`!P``@`````#```````?___@``!@```8``!````(,
  720. XM``#'__^,``",`/[$``"(`X/$``"(`@#$``"(!`!$``",!'S$``#'_/^,``!`M
  721. XM!(`(``!@!(`8```?_/_@````!(___^``!+```!@`!*````@`!./__XP`!,9`F
  722. XM`,0`!,9``$0`!,9``$0`!,9``$0`!,9``,0`!.9__XP`!'Q```@`!`!``!@`4
  723. XM`@#__^```X.``````/X````````````?___@```____P```X``!P``!P```X>
  724. XM``!P`'PX``!P`?\X``!P`_^X``!P`X,X```X`P!P```_^W_P```?^W_@````Q
  725. XM`P```````P```````P___^```Q____```QP``'```SF``#@``SF``#@``SF`Y
  726. XM`#@``SF``#@``SF``#@``QF``'```X.___```_^__^```?\``````'P`````\
  727. XM`````````````"X`'``"```!9`,``````.,0``$``````%<`'@`N`!P`!@`!N
  728. XM``$```%0```"M`````````````````````````@```````````"`````@```0
  729. XM`````````````````$%B;W5T+BXN``!70DQI;FL@5C$N,#`*4F5L96%S960@P
  730. XM4V5P=&5M8F5R(#0L(#$Y.3$*J3$Y.3$@8GD@1&%V92!38VAR96EB97(`475IC
  731. XM="!70DQI;FM\1&]N)W0@475I=```````%`````````,6```#(````V!0<F]G!
  732. XM<F%M(%)E<75E<W0N+BX``$5R<F]R.B`E<PHE<P``3VL``````!0````````#"
  733. XMC````Z````.N4')O9W)A;2!297%U97-T+BXN``!%<G)O<CH@)7,*)7,*)7,`+
  734. XM3VL``````!0````````#Q@```]H```/J```````````````````````````D%
  735. XM5D52.B!70DQI;FL@5C$N,#`@*#0N.2XY,2D````$%G=O<FMB96YC:"YL:6)R[
  736. XM87)Y`&EC;VXN;&EB<F%R>0``:6YT=6ET:6]N+FQI8G)A<GD```!70DQI;FL`%
  737. XM`$-O=6QD;B=T(&-R96%T92!T:&4@;&EN:P``0V]U;&1N)W0@;W!E;@!F;W(@\
  738. XM;&EN:VEN9P!#;W5L9&XG="!C<F5A=&4`82!F:6QE;F%M92!F;W(@=&AE(&QI_
  739. XM;FL`3&EN:U]T;U\``$QI;FM?`%]T;U\``&QI;FM?`&QI;FM?=&]?```````H:
  740. XM```%&@``````````````````````````````````````````!3P`````````@
  741. XM`````````````````````````````````````````````````````````````
  742. XM``````````````````````/L````$`````$```4:```$^```!#(```/^```#5
  743. XM^@```_8```/"```#O@```[H```.(```#A````X````+B```"W@```KX```%:J
  744. X(`````````_+"W
  745. X``
  746. Xend
  747. Xsize 4868
  748. END_OF_FILE
  749. if test 6853 -ne `wc -c <'WBLink.uu'`; then
  750.     echo shar: \"'WBLink.uu'\" unpacked with wrong size!
  751. fi
  752. # end of 'WBLink.uu'
  753. fi
  754. echo shar: End of archive 1 \(of 1\).
  755. cp /dev/null ark1isdone
  756. MISSING=""
  757. for I in 1 ; do
  758.     if test ! -f ark${I}isdone ; then
  759.     MISSING="${MISSING} ${I}"
  760.     fi
  761. done
  762. if test "${MISSING}" = "" ; then
  763.     echo You have the archive.
  764.     rm -f ark[1-9]isdone
  765. else
  766.     echo You still need to unpack the following archives:
  767.     echo "        " ${MISSING}
  768. fi
  769. ##  End of shell archive.
  770. exit 0
  771. -- 
  772. Mail submissions (sources or binaries) to <amiga@uunet.uu.net>.
  773. Mail comments to the moderator at <amiga-request@uunet.uu.net>.
  774. Post requests for sources, and general discussion to comp.sys.amiga.misc.
  775.